package com.harry.resource.inner.module.srv;

import com.harry.resource.inner.entity.InnerArea;
import com.harry.decoupling.impl.module.GenericSrvImpl;

public class InnerAreaRestfulService extends GenericSrvImpl<InnerArea> {

	@Override
	public InnerArea save(InnerArea t) throws Exception {
		t = super.save(t);
		if (t.getParent() != null) {
			t.setCodePath("." + t.getCode() + t.getParent().getCodePath());
		} else {
			t.setCodePath("." + t.getCode() + ".");
		}
		return super.save(t);
	}
}
